# $Id: PKGBUILD 183433 2013-04-21 22:11:25Z heftig $
# Maintainer: Ionut Biru <ibiru@archlinux.org>

pkgname=liblouis
pkgver=2.5.2
pkgrel=2
pkgdesc="Open-source braille translator and back-translator"
arch=(i686 x86_64)
url="http://code.google.com/p/liblouis/"
license=('GPL3')
depends=(glibc)
makedepends=(help2man python2 python)
options=(!libtool)
install=liblouis.install
source=(http://liblouis.googlecode.com/files/$pkgname-$pkgver.tar.gz)
sha1sums=('   93437f3c3a9a178ad08bdf6daca2a82cf3df2cc2')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr --disable-static
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install

  cd python
  LD_PRELOAD+=":$srcdir/$pkgname-$pkgver/liblouis/.libs/liblouis.so"
  python2 setup.py install --root="$pkgdir" --prefix="/usr" --optimize=1
  python setup.py install --root="$pkgdir" --prefix="/usr" --optimize=1
}
# vim:set ts=2 sw=2 et:
